package com.nulstudio.sppm.Entities;

import java.util.Objects;

public final class PersonalInformation {
    private final int uid;

    private final String name;

    private final String userName;

    private final String gender;

    private final String post;


    public PersonalInformation(int uid, String name, String userName, String gender, String post) {
        this.uid = uid;
        this.name = name;
        this.userName = userName;
        this.gender = gender;
        this.post = post;
    }

    public int getUid() {
        return uid;
    }

    public String getName() {
        return name;
    }

    public String getUserName() {
        return userName;
    }

    public String getGender() {
        return gender;
    }

    public String getPost() {
        return post;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        PersonalInformation that = (PersonalInformation) o;
        return uid == that.uid && Objects.equals(name, that.name) && Objects.equals(userName, that.userName)
                && Objects.equals(gender, that.gender) && Objects.equals(post, that.post);
    }

    @Override
    public int hashCode() {
        return Objects.hash(uid, name, userName, gender, post);
    }
}
